<template>
<div class="login_box">
    <div style="margin-bottom: 20px;font-weight: bold;font-size:18px;">用户名:{{loginForm.mgName}}</div>
    <div style="margin-bottom: 20px;font-weight: bold;font-size:18px;">手机号:{{loginForm.mgMobile}}</div>
</div>
</template>

<script>
export default {
  name: 'MyAccount',
  data () {
    return {
      loginForm: {},
      // 这是表单的验证规则对象
      loginFormRules: {
        // 验证用户名是否合法
        mgName: [
          {required: true, message: '请输入登录名称', trigger: 'blur'}
        ],
        // 验证密码是否合法
        mgPwd: [
          {required: true, message: '请输入登录密码', trigger: 'blur'},
          {min: 6, max: 15, message: '长度在6到15个字符', trigger: 'blur'}
        ]
      }
    }
  },
  created () {
    this.getLoginForm()
  },
  methods: {
    getLoginForm () {
      this.loginForm.mgName = localStorage.getItem('loginName')
      this.loginForm.mgMobile = localStorage.getItem('loginMobile')
      console.log(this.loginForm)
    }
  }
}
</script>

<style scoped>
.login_box{
  margin-top: 150px;
  margin-bottom: 40px;
  margin-left: 600px;
  /*display: flex;*/
  /*justify-content: space-between;*/
  /*align-items: center;*/
}
</style>
